import Vue from 'vue'
import Router from 'vue-router'
import goods from '../components/goods/goods'
import ratings from '../components/ratings/ratings'
import seller from '../components/seller/seller'
import Home from '../components/home/Home'
import shoper from '../components/shoper'
import City from '../components/city/City'
import login from '../components/login/login'
import Tologin from '../components/tologin/tologin'
import Red from '../components/redpack/red'
import Coin from '../components/coin/coin'
import Money from '../components/money/money'
import Deal from '../components/dealdetail/dealdetail'
import Deals from '../components/dealdetail/deals'
import Address from '../components/address/addressList'
import EditAddress from '../components/address/editaddress'
import AddAddress from '../components/address/addaddress'
import SuperMarket from '../components/supermarket/supermarket'
import Order from '../components/orderfrom/order'
import Estimate from '../components/estimate/estimate'
import Member from '../components/member/member'
import PaySuccess from '../components/paysuccess/paysuccess'
import ResSearch from '../components/ressearch/ressearch'
import Pay from '../components/pay/pay'

Vue.use(Router)

const routes = [{
  path: '/',
  component: Home
}, {
  path: '/redpack',
  component: Red
}, {
  path: '/login',
  component: login
}, {
  path: '/tologin',
  component: Tologin
},
{
  path: '/city',
  component: City
}, {
  path: '/shoper',
  component: shoper,
  children: [{
    path: '/goods',
    component: goods
  }, {
    path: '/ratings',
    component: ratings
  }, {
    path: '/seller',
    component: seller
  }]
}, {
  path: '/coin',
  component: Coin
}, {
  path: '/money',
  component: Money
}, {
  path: '/dealdetail',
  component: Deal
}, {
  path: '/dealdetail/deals',
  component: Deals
}, {
  path: '/address',
  component: Address
}, {
  path: '/editaddresss',
  component: EditAddress
}, {
  path: '/addaddress',
  component: AddAddress
}, {
  path: '/supermarket',
  component: SuperMarket
}, {
  path: '/order',
  component: Order
}, {
  path: '/estimate',
  component: Estimate
}, {
  path: '/member',
  component: Member
}, {
  name: 'paysuccess',
  path: '/paysuccess',
  component: PaySuccess
}, {
  path: '/ressearch',
  component: ResSearch
}, {
  name: 'pay',
  path: '/pay',
  component: Pay
}]

export default new Router({
  linkActiveClass: 'active',
  routes
})
